Skip to content

feat(project): scaffold a project into the directory you already opened - #230

Merged
JeffreyJYZ merged 1 commit into
mainfrom
feat/init-in-place-rust
Nov 22, 2026
Merged

JeffreyJYZ merged 1 commit into
mainfrom
feat/init-in-place-rust

Conversation

@jyzbot

@jyzbot jyzbot commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Open an empty folder and nothing can be made of it: create_project(parent, name, kind, standard) builds <parent>/<name> and refuses when that path exists, so the folder you are already in is the one case it cannot serve.

init_project(root, kind, standard) scaffolds into root itself — same files, same per-kind layout, same templates.rs constants and resolve_standard, so there is no second copy of a starter template to drift. It reuses the existing refusal text for an unknown kind and for a standard from the wrong language.

Emptiness is decided by the backend, not the caller: nothing at all, or only .quarry/, .git or .DS_Store is accepted, and anything else is refused with up to three offending entries named so a panel can say why. It never overwrites an existing file, and it returns exactly what open_project returns for that directory, so the caller activates the project without a second round trip.

create_project and its tests are untouched.

Eleven tests cover each kind, the directory name becoming the project name, the refusal cases, the allowed occupants, the no-overwrite rule and the standard reaching the manifest. Gate 11/11 on the merged tree, clippy -D warnings clean, file-size clean.

@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
quarry-docs Ready Ready Preview Nov 22, 2026 3:24am UTC

@JeffreyJYZ
JeffreyJYZ merged commit f6b1646 into main Nov 22, 2026
6 checks passed
@JeffreyJYZ
JeffreyJYZ deleted the feat/init-in-place-rust branch November 22, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants